package io.wit.modules.sys.dao;

import io.wit.modules.sys.entity.SysUserEntity;
import io.wit.modules.wit.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 系统用户
*/
@Mapper
public interface SysUserDao extends BaseDao<SysUserEntity> {
	
	/**
	 * 查询用户的所有权限
	 * @param userId  用户ID
	*/
	List<String> queryAllPerms(Long userId);
	
	/**
	 * 查询用户的所有菜单ID
	*/
	List<Long> queryAllMenuId(final Long userId);

	List<Long> queryEmployeeMenu(final Long userId);

	/**
	 * 根据用户名，查询系统用户
	*/
	SysUserEntity queryByUserName(String username);
	
	/**
	 * 修改密码
	*/
	int updatePassword(Map<String, Object> map);

	UserEntity queryObjects(String userName);

	void updates(Map<String, Object> map);

	SysUserEntity queryObjectUnit(Long userId);

	void updatePwd(SysUserEntity user);

	int resettingPassword(Map<String, Object> map);

	HashMap<String,Object> getSubjectInfo(final String userName);

	HashMap<String,Object> getUserInfo(final String userName);

    int check(final Long userId);

    List<String> queryEmployeePerms(final Long userId);

    //admin或平台运营管理
    List<SysUserEntity> queryListSuperData(Map<String,Object> map);
    int queryListSuperTotal(Map<String,Object> map);
}